[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DEFINE EVENT <label> FROM

Description:
This command creates an event region on the screen without a visible
button or graphical object.  It creates a "click" region that is
invisible.  However, the click region can be superimposed over other
objects such as icons, bars in a bar chart, and other graphical objects.
Event regions are automatically created when icon buttons are defined.

Syntax:
DEFINE EVENT <label> FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>
   [ACTIVATE]

Arguments:
<label> is a label name assciated with a region in the event array.

Example:
DRAW BOX FROM 21,26 TO 22,56              // display a box
@ 21.5,28 DRAW "CLICK HERE..."            // display message in box
DEFINE EVENT "PAUSE" ;                    // define the event area
   FROM 21,26 TO 22,56 ;                  // specify the area
   ACTIVATE                               // activate the region
WAIT EVENT "PAUSE" RELEASE                // wait for a mouse press

         Purpose: Create a mouse click region
 Mapped Function: __DefEventRegion() contained in GLLIBR.PRG.
   dGE functions: __ScanObjects(),__FindUnusedHandle(),__HandleInRange()
                  __ActEventRegion(),__HandleError()
   Other GL UDFs: None.
System variables: _handles_[]
System constants: NoHandlesLeft

See Also:
ACTIVATE EVENT, DEACTIVATE EVENT, RELEASE EVENT

See Also: __DefEventRegion()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson